Skip to content

Reduce the agent rules to one rules-only AGENTS.md - #295

Merged
soareschen merged 2 commits into
mainfrom
agents-rules-only
Nov 14, 2026
Merged

soareschen merged 2 commits into
mainfrom
agents-rules-only

Conversation

@soareschen

@soareschen soareschen commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

Overview

[claude-opus-5.5] cgp now has one AGENTS.md, and it holds only the rules that apply to most changes in this repository. The rules for a single kind of task sit beside the code they govern: the macro crates' rules in a new crates/macros/README.md, and the test suite's rules in crates/tests/README.md, so the two nested AGENTS.md files are gone. The root names the /cgp skill and the knowledge base as the place to learn CGP, instead of teaching it.

Impact

  • Task guides: the root opens with the rules every CGP repository shares, then names the guide to read before each kind of task, such as changing a macro crate, adding a test, or reviewing a macro.
  • Finding a name: agents look up where a name is exported in the skill's import table or the construct reference, because the trimmed prelude no longer carries most names. The old rule told them to start from cgp::prelude.
  • Snapshot location: the macro rules put a macro's expansion snapshot in the cgp-tests target that owns its feature, where every snapshot lives. The old rule named cgp-macro-tests.
  • Linked heading: the Macro review workflow heading stays as a pointer to the knowledge base's procedure, because the website links it.
  • Test comments: the comments that cited the nested files now cite crates/tests/README.md and the knowledge base's writing guide.

soareschen and others added 2 commits November 14, 2026 20:41
The root AGENTS.md now holds only the rules for most changes in the
repository, opens with the shared block that sends agents to the `/cgp`
skill and the knowledge base to learn CGP, and indexes the guide for
each kind of task. The macro crates' rules move to a new
crates/macros/README.md, and the test suite's rules to
crates/tests/README.md, so the two nested AGENTS.md files are gone.

The root no longer tells agents to start from `cgp::prelude`, which the
trimmed prelude made wrong; it points to the skill's import table and
the construct reference instead. The macro review keeps its heading as
a pointer to the knowledge base's procedure, which holds its rules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The macro crates' rules said expansion snapshots go in cgp-macro-tests,
but every snapshot lives in the cgp-tests target that owns the macro's
feature; the rule now says so. AGENTS.md drops its rule on post-codegen
failures, which the test suite's rules state, and folds its fixture
update into the rule on propagating a construct change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@soareschen
soareschen marked this pull request as ready for review November 14, 2026 19:55
@soareschen
soareschen merged commit d8d6010 into main Nov 14, 2026
6 checks passed
@soareschen
soareschen deleted the agents-rules-only branch November 14, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant